package cn.mw.cmdb.template.enums;

/**
 * @author gengjb
 * @description 模板明细类型枚举
 * @date 2024/7/30 11:36
 */
public enum TemplateDetailEnum {
    APPLICATION(1,"应用集"),
    MONITOR_ITEM(2,"监控项"),
    TRIGGERS(3,"触发器"),
    GRAPHS(4,"图形"),
    DASHBOARDS(5,"仪表盘"),
    DISCOVERIES(6,"自动发现"),
    HTTP_TEST(7,"WEB监测"),
    VALUE_MAPPING(8,"值映射"),
    ITEM_PROTOTYPE(9,"监控项原型"),
    TRIGGERS_TYPE(10,"触发器类型"),
    HOST(11,"主机"),
    ;

    private Integer type;

    private String desc;

    public Integer getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }

    TemplateDetailEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static TemplateDetailEnum getTemplateDetailEnum(Integer type) {
        for (TemplateDetailEnum templateDetailEnum : values()) {
            if (type.equals(templateDetailEnum.getType())) {
                return templateDetailEnum;
            }
        }
        return null;
    }
}
